﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RendicionDocInsertForm.aspx.cs"

 Inherits="UILGestion.ObraAdmin.RecepcionDoc.RendicionDocInsertForm" %>
 <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
 <%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="lib" %>
<%@ Register src="DistribucionGastoGrid.ascx" tagname="DistribucionGastoGrid" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../../Scripts/DistribucionGasto.js" type="text/javascript"></script>



    <%--<link href="../../Scripts/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery-ui.min.js" type="text/javascript"></script>--%>
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>  
	<script type="text/javascript">
	    $(document).ready(function () {
	        SearchText();
	    });
	    function SearchText() {
	        $(".autosuggest").autocomplete({
	            source: function (request, response) {
	                $.ajax({
	                    type: "POST",
	                    contentType: "application/json; charset=utf-8",
	                    url: "Default.aspx/GetAutoCompleteData",
	                    data: "{'username':'" + document.getElementById('txtSearch').value + "'}",
	                    dataType: "json",
	                    success: function (data) {
	                        response(data.d);
	                    },
	                    error: function (result) {
	                        alert("Error");
	                    }
	                });
	            }
	        });
	    }
	</script>


    
</head>
<body>
    <form id="form1" runat="server">

    <div class="demo">
<div class="ui-widget">
    <label for="tbAuto">Enter UserName: </label>
   <input type="text" id="txtSearch" class="autosuggest" />
</div>
    <div>
     <asp:ToolkitScriptManager 
                ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="true"  
                EnablePartialRendering="true"></asp:ToolkitScriptManager>
        <asp:Panel ID="Facturacion" runat="server" GroupingText="Facturacion" 
            Height="263px" style="margin-right: 0px" Width="878px">
            <table class="ui-accordion">
                <tr>
                    <td >
                        </td>
                    <td >
                        </td>
                </tr>
                <tr>
                    <td class="style9">
                        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"  
                        SkinID="GridView"
                            Height="75px" Width="813px">
                            <Columns>
                                <asp:BoundField DataField="codproveedor" HeaderText="Cod. Proveedor" 
                                    ItemStyle-Width="60px" DataFormatString="{0:d}" >
                                <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="nombre" HeaderText="Nombre" ItemStyle-Width="60px" 
                                    DataFormatString="{0:d}" >
                                <ItemStyle Width="60px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="tipo" HeaderText="Tipo Doc" ItemStyle-Width="30px" 
                                    DataFormatString="{0:d}" >
                                <ItemStyle Width="30px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="numero" HeaderText="Numero" ItemStyle-Width="30px" 
                                    DataFormatString="{0:d}" >
                                <ItemStyle Width="30px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="fecha" HeaderText="Fecha" ItemStyle-Width="30px" 
                                    DataFormatString="{0:d}" >
                                <ItemStyle Width="30px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="fecha" HeaderText="Moneda" ItemStyle-Width="30px" 
                                    DataFormatString="{0:d}" >
                                <ItemStyle Width="30px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="fecha" HeaderText="Importe" ItemStyle-Width="30px" 
                                    DataFormatString="{0:d}" >
                                
                                <ItemStyle Width="30px" />
                                </asp:BoundField>
                                
                            </Columns>
                        </asp:GridView>
                    </td>
                    <td>
                        &nbsp;</td>

                </tr>
                <tr>
                    <td >
                    </td>
                    <td >
                    </td>
                </tr>
                <tr>
                    <td >
                    </td>
                    <td >
                    </td>
                </tr>
            </table>
        </asp:Panel>
    
    </div>

    

          <asp:Panel ID="facturacionUNOPNL" runat="server" GroupingText="Facturacion" BorderColor="LightSteelBlue" BackColor="white">
          <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                             <ContentTemplate>
              
 <table >
                <tr>
                    <td>
                        <table >
                            <tr>
                                <td  width="100px" align="center" colspan="2">
                                     <asp:CheckBox ID="envioGPUNOchk" runat="server" BackColor="#2D3E5B" 
                                        BorderColor="#CC0000" Font-Bold="True" Font-Size="XX-Small" ForeColor="White" 
                                        Text="ENVIAR DOCUMENTO SISTEMA GESPAG" Width="250px" 
                                        ToolTip="Exporta la información del documento y Proveedor al sistema  GESPAG al momento de guardar el FR" />
                                     <br />
                                </td>
                                
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                                    F/R:</td>
                                <td width="150px">
                                    <asp:TextBox ID="FRUNITXT" runat="server" TabIndex="1"></asp:TextBox>
                                    <img alt="" class="style4" src="../../Images/req.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                              Fecha Recepción: 
                                </td>
                                <td>
                                    <asp:TextBox  ID="FecharecepcionTXT" runat="server" TabIndex="2"></asp:TextBox>
                                    <asp:ImageButton ID="ImageButton3" runat="Server" 
                                        AlternateText="Click aqui para mostrar calendario" 
                                        ImageUrl="~/Images/month.gif" Width="16px" />
                                    <asp:CalendarExtender ID="fechaVencimTextBox0_CalendarExtender" runat="server" 
                                        PopupButtonID="ImageButton3" TargetControlID="FecharecepcionTXT">
                                    </asp:CalendarExtender>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                              Tipo Documento: 
                                </td>
                                <td>
                             <asp:DropDownList ID="tipoDocDropDownList" Width="220px" runat="server" TabIndex="3"  AutoPostBack="true"
                                        ></asp:DropDownList>
                           
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                              Num. Documento: 
                                </td>
                                <td>
                                    <asp:TextBox ID="documentoTextBox" runat="server" Width="150px" 
                                        TabIndex="4"></asp:TextBox>
                                    <img alt="" class="style4" src="../../Images/req.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                              Moneda:</td>
                                <td>
                             <asp:DropDownList ID="monedaDropDownList" runat="server"   
                                 Width="150px" TabIndex="5"></asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </td>
                    <td>
                        <table class="ui-accordion">
                            <tr>
                                <td align="right" width="100px">
                 Glosa:</td>
                                <td>

                            <lib:Input ID="descripcionTextBox" runat="server" backcolor="#DFE8F6" Width="350px"
                            DataType="List" method="GetOrdenCompraItem" TabIndex="6"  
                             />
                            
                                </td>
                                <td rowspan="8" valign="top">
                                <asp:UpdatePanel runat="server" ID="totalesUPNL">
                                <ContentTemplate>
                                 <asp:Panel ID="facturaPNL" runat="server">
                                    <table class="PanelTotales">
                                        <tr>
                                            <td align="right" width="100px">
                                                <b>Base Imponible: </b>
                                            </td>
                                            <td align="right" width="100px">
                                                <lib:Input ID="totalNetoTXT" runat="server" DataType="Double" TabIndex="10" 
                                                    Width="80px" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" width="100px">
                                                <strong>Base Inafecto:</strong></td>
                                            <td align="right" width="100px">
                                                <lib:Input ID="totalInafectoTXT" runat="server" DataType="Double" TabIndex="10" 
                                                    Width="80px" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" width="100px">
                                                <b>IGV<asp:TextBox ID="IGVValor" Width="20px"  runat="server" BorderStyle="None" BackColor="Transparent"></asp:TextBox>
                                                &nbsp; %: </b>
                                            </td>
                                            <td align="right" width="100px">
                                                <lib:Input ID="IGVTXT" runat="server" DataType="Double" TabIndex="11" 
                                                    Width="80px" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" width="100px">
                                                <strong>ISC:</strong></td>
                                            <td align="right" width="100px">
                                                
                                                <lib:Input ID="iscTXT" runat="server" DataType="Double" TabIndex="12" 
                                                    Width="80px"></lib:Input>
                                                
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" width="100px">
                                                <strong>Total:</strong></td>
                                            <td align="right" width="100px">
                                                <lib:Input ID="totalFinalTXT" runat="server" DataType="Double" TabIndex="12" 
                                                    Width="80px"></lib:Input>
                                                
                                            </td>
                                        </tr>
                                    </table>
                                    </asp:Panel>
                                     <asp:Panel ID="HonorarioPNL" runat="server">
                                      <table class="PanelTotales">
                                        <tr>
                                            <td align="right" width="100px">
                                                <b>Importe Honorario: </b>
                                            </td>
                                            <td align="right" width="100px">
                                                <lib:Input ID="importeHonorarioTXT" runat="server" DataType="Double" TabIndex="10" 
                                                    Width="80px" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" width="100px">
                                               <strong> Ret. Renta 4ta.:</strong></td>
                                            <td align="right" width="100px">
                                                <lib:Input ID="ren4TXT" runat="server" DataType="Double" TabIndex="10" 
                                                    Width="80px" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" width="100px">
                                                <strong>Importe Neto:</strong></td>
                                            <td align="right" width="100px">
                                                <lib:Input ID="ImporteNetoTXT" runat="server" DataType="Double" TabIndex="12" 
                                                    Width="80px"></lib:Input>
                                                
                                            </td>
                                        </tr>
                                    </table>
                                       </asp:Panel>
                                       </ContentTemplate>
                                       <Triggers>
                                       <asp:AsyncPostBackTrigger ControlID="tipoDocDropDownList" />
                                       <asp:AsyncPostBackTrigger ControlID="fechaEmisonTextBox" />
                                       </Triggers>
                                       </asp:UpdatePanel>
                                </td>

                            </tr>
                            <tr>
                                <td align="right" width="100px">
                              Fecha Emision:</td>
                                <td>
                                    <asp:TextBox ID="fechaEmisonTextBox" runat="server" AutoPostBack="True" 
                                         TabIndex="7"></asp:TextBox>
                                    <asp:ImageButton ID="ImageButton2" runat="Server" 
                                        AlternateText="Click aqui para mostrar calendario" 
                                        ImageUrl="~/Images/month.gif" Width="16px" />
                                    <asp:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="ImageButton2" 
                                        TargetControlID="fechaEmisonTextBox">
                                    </asp:CalendarExtender>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                              Fecha Vencimiento: 
                                </td>
                                <td>
                                    <asp:TextBox ID="fechaVencimTextBox" runat="server" TabIndex="8"></asp:TextBox>
                                    <asp:ImageButton ID="ImageButton32" runat="Server" 
                                        AlternateText="Click aqui para mostrar calendario" 
                                        ImageUrl="~/Images/month.gif" Width="16px" />
                                    <asp:CalendarExtender ID="CalExt2" runat="server" PopupButtonID="ImageButton32" 
                                        TargetControlID="fechaVencimTextBox">
                                    </asp:CalendarExtender>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                              Tipo Cambio $: 
                                </td>
                                <td>
                                    <asp:TextBox ID="TipoCambioTXT" runat="server"></asp:TextBox>
                                    <img alt="" class="style4" src="../../Images/req.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                             Fecha Pago:</td>
                                <td>
                             <asp:DropDownList ID="fechaPagoDDL" runat="server" Width="200px" TabIndex="9">
                             </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                                    Subdiario:</td>
                                <td>
                                    <asp:DropDownList ID="DropDownList1" runat="server" Height="16px" Width="151px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                                    Cod. Compra:</td>
                                <td>
                                    <asp:DropDownList ID="DropDownList2" runat="server" Height="16px" Width="151px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="100px">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>

          </ContentTemplate>
          </asp:UpdatePanel>
 </asp:Panel>





    <br />
    <uc1:DistribucionGastoGrid ID="DistribucionGastoGrid1" runat="server" />
    <br />
    <br />
   
    </form>
   <%-- 
<script type="text/javascript">

    $(document).ready(function () {

        SearchText();
        
    });

    function SearchText() {

        $(".autosuggest").autocomplete({

            source: function (request, response) {

                $.ajax({

                    type: "POST",

                    contentType: "application/json; charset=utf-8",

                    url: "RendicionDocInsertForm.aspx/GetCuentaConf",

                    data: "{'prefixText':'" + document.getElementById('cuenta1TXT').value + "'}",

                    dataType: "json",

                    success: function (data) {

                        response(data.d);

                    },

                    error: function (result) {

                        alert("Error");

                    }

                });

            }

        });

    }

</script>

--%>
    </body>
</html>
